/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package seGobangClient.uiSystem2D;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JPanel;

/**
 *
 * @author IBM
 */
public class RectPanel extends JPanel{
    private Color color;
public RectPanel(Color c)
{
    color=c;
    this.setSize(26,26);
    repaint();
}
public void paint(Graphics g)
{
    Graphics2D   g2   =   (Graphics2D)g;     //g是Graphics对象   
  g2.setStroke(new   BasicStroke(3.0f));
    g.setColor(color);
    g.drawLine(0, 0, 0, 7);
    g.drawLine(0, 0, 7, 0);
    g.drawLine(18, 0, 25, 0);
    g.drawLine(25, 0, 25, 7);
    g.drawLine(0, 18, 0, 25);
    g.drawLine(0, 25, 7, 25);
    g.drawLine(18, 25, 25, 25);
    g.drawLine(25, 25, 25,18);
}
}
